<!doctype html>
<html class="no-js" lang="zxx">
<head>
    <meta charset="utf-8">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <title>Photographer</title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="shortcut icon" type="image/x-icon" href="assets/img/icon/favicon.png">

    <link rel="stylesheet" href="assets/css/bootstrap.min.css">
    <link rel="stylesheet" href="assets/css/owl.carousel.min.css">
    <link rel="stylesheet" href="assets/css/slicknav.css">
    <link rel="stylesheet" href="assets/css/animate.min.css">
    <link rel="stylesheet" href="assets/css/magnific-popup.css">
    <link rel="stylesheet" href="assets/css/fontawesome-all.min.css">
    <link rel="stylesheet" href="assets/css/themify-icons.css">
    <link rel="stylesheet" href="assets/css/slick.css">
    <link rel="stylesheet" href="assets/css/nice-select.css">
    <link rel="stylesheet" href="assets/css/style.css">

    <style>
        .gallery-area {
            background: #fff;
        }
        .gallery-area .row > .col {
            padding: 8px !important; 
        }
        .ar-box-16-9 {
            position: relative;
            width: 100%;
            height: 0;
            padding-top: 56.25%; 
            background-color: #f0f0f0;
        }
        /* --- CSS 修改点 --- */
        .ar-box-16-9 .gallery-img {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            object-fit: contain;
            object-position: center top;  /* 关键修改：图片与容器顶部对齐 */
        }
        .ar-box-16-9 .overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
        }
        .overlay-content h3 {
            font-size: 24px;
        }
    </style>
</head>
<body>
    <header>
        <div class="header-area header-transparent">
            <div class="main-header header-sticky">
                <div class="container-fluid">
                    <div class="row">
                        <div class="col-xl-12">
                            <div class="d-flex justify-content-between flex-wrap align-items-center">
                                <div class="logo">
                                    <a href="index.html"><img src="assets/img/logo/logo.png" alt=""></a>
                                </div>
                                <div class="main-menu d-none d-lg-block text-center">
                                    <nav>
                                        <ul id="navigation">
                                            <li><a href="index.html">Home</a></li>
                                            <li><a href="photo.html">Photo</a></li>
                                            <li><a href="journey.html">Journey</a></li>
                                            <li><a href="mood.html">Mood</a></li>
                                            <li><a href="tool.html">Tool</a></li>
                                        </ul>
                                    </nav>
                                </div>
                            </div>
                        </div>
                        <div class="col-12">
                            <div class="mobile_menu d-block d-lg-none"></div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </header>
    <main>
        <div class="slider-area">
            <div class="single-slider slider-bg4 hero-overly slider-height2 d-flex align-items-end">
                <div class="container">
                    <div class="row">
                        <div class="col-xxl-12">
                            <div class="hero-caption hero-caption2 text-center">
                                <p>Explore</p>
                                <div class="generator-title" style="font-family: 'Microsoft YaHei', 'SimHei', '黑体', sans-serif !important; font-size: 1.75rem !important; font-weight: bold !important; text-align: center !important; color: #ffffff !important; margin-bottom: 0.5rem !important;">拍下的一刻已经是永远</div>
                                <h2></h2>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="gallery-area section-padding">
            <div class="container-fluid">
                <div class="row row-cols-1 row-cols-sm-2 row-cols-md-3" id="gallery-wrapper">
                    </div>
                <div class="row ">
                    <div class="col-xl-12">
                        <div class="more-btn mt-50 text-center">
                            <a href="#" id="loadMoreBtn" class="btn_01">Load More</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </main>
    <footer>
        <div class="footer-area footer-padding">
            <div class="footer-wrapper ">
                <div class="container">
                    <div class="row d-flex justify-content-between">
                        <div class="col-xl-3 col-lg-4 col-md-6 col-sm-6">
                            <div class="single-footer-caption mb-50">
                                <div class="single-footer-caption mb-30">
                                    <div class="footer-logo mb-25">
                                        <a href="index.html"><img src="assets/img/logo/logo2_footer.png" alt=""></a>
                                    </div>
                                    <div class="footer-tittle">
                                        <div class="footer-pera">
                                            <p>不做墨守成规的乖孩子 <br>要做周游世界的徐霞客</p>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="offset-xl-1 col-xl-2 col-lg-2 col-md-4 col-sm-5">
                            <div class="single-footer-caption mb-50">
                                <div class="footer-tittle">
                                    <h4>Navigation</h4>
                                    <ul>
                                        <li><a href="#">Home</a></li>
                                        <li><a href="#">About</a></li>
                                    </ul>
                                </div>
                            </div>
                        </div>
                        <div class="col-xl-2 col-lg-2 col-md-4 col-sm-5">
                            <div class="single-footer-caption mb-50">
                                <div class="footer-tittle">
                                    <h4>Contact</h4>
                                    <ul>
                                        <li><a href="#">Xi'an, China</a></li>
                                        <li class="number2"><a href="#">normalsunday@qq.com</a></li>
                                    </ul>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </footer>
    <div id="back-top">
        <a class="wrapper" title="Go to Top" href="#">
            <div class="arrows-container">
                <div class="arrow arrow-one"></div>
                <div class="arrow arrow-two"></div>
            </div>
        </a>
    </div>

    <script src="./assets/js/vendor/modernizr-3.5.0.min.js"></script>
    <script src="./assets/js/vendor/jquery-1.12.4.min.js"></script>
    <script src="./assets/js/popper.min.js"></script>
    <script src="./assets/js/bootstrap.min.js"></script>
    <script src="./assets/js/owl.carousel.min.js"></script>
    <script src="./assets/js/slick.min.js"></script>
    <script src="./assets/js/jquery.slicknav.min.js"></script>
    <script src="./assets/js/hover-direction-snake.min.js"></script>
    <script src="./assets/js/wow.min.js"></script>
    <script src="./assets/js/jquery.magnific-popup.js"></script>
    <script src="./assets/js/jquery.nice-select.min.js"></script>
    <script src="./assets/js/jquery.counterup.min.js"></script>
    <script src="./assets/js/waypoints.min.js"></script>
    <script src="./assets/js/contact.js"></script>
    <script src="./assets/js/jquery.form.js"></script>
    <script src="./assets/js/jquery.validate.min.js"></script>
    <script src="./assets/js/mail-script.js"></script>
    <script src="./assets/js/jquery.ajaxchimp.min.js"></script>
    <script src="./assets/js/plugins.js"></script>
    <script src="./assets/js/main.js"></script>
    
    <script>
    $(document).ready(function(){
        const imageList = [
            { src: 'assets/img/gallery/gallery1.jpg', title: 'QING DAO' },
            { src: 'assets/img/gallery/gallery2.jpg', title: 'QING DAO' },
            { src: 'assets/img/gallery/gallery3.jpg', title: 'QING DAO' },
            { src: 'assets/img/gallery/gallery4.jpg', title: 'QING DAO' },
            { src: 'assets/img/gallery/gallery5.jpg', title: 'GONG GA' },
            { src: 'assets/img/gallery/gallery6.jpg', title: 'GONG GA' },
            { src: 'assets/img/gallery/gallery7.jpg', title: 'Quan zhou' },
            { src: 'assets/img/gallery/gallery8.jpg', title: 'Hong Kong' },
            { src: 'assets/img/gallery/gallery9.jpg', title: 'Shangri-La' },
            { src: 'assets/img/gallery/gallery10.jpg', title: 'Hong Kong' },
            { src: 'assets/img/gallery/gallery11.jpg', title: 'XI AN' },
            { src: 'assets/img/gallery/gallery12.jpg', title: 'WU HAN' },
            { src: 'assets/img/gallery/gallery13.jpg', title: 'JIE YANG' },
            { src: 'assets/img/gallery/gallery14.jpg', title: 'GZCCC' },
            { src: 'assets/img/gallery/gallery15.jpg', title: 'GUANG ZHOU' },
            { src: 'assets/img/gallery/gallery16.jpg', title: 'GUANG ZHOU' },
            { src: 'assets/img/gallery/gallery17.jpg', title: 'GUANG ZHOU' },
            { src: 'assets/img/gallery/gallery18.jpg', title: 'GUANG ZHOU' },
            { src: 'assets/img/gallery/gallery19.jpg', title: 'CHI SHUI' },
            { src: 'assets/img/gallery/gallery20.jpg', title: 'XI AN' },
            { src: 'assets/img/gallery/gallery21.jpg', title: 'GONG GA' },
            { src: 'assets/img/gallery/gallery22.jpg', title: 'XI AN' },
            { src: 'assets/img/gallery/gallery23.jpg', title: 'XI AN' },
            { src: 'assets/img/gallery/gallery24.jpg', title: 'CHI SHUI' },
            { src: 'assets/img/gallery/gallery25.jpg', title: 'XI AN' },
        ];

        const itemsPerPage = 9;
        const galleryWrapper = $('#gallery-wrapper');

        imageList.forEach((image, index) => {
            const isHidden = index >= itemsPerPage;
            const hiddenClass = isHidden ? 'hidden-item' : '';
            const hiddenStyle = isHidden ? 'style="display: none;"' : '';
            const itemHtml = `
                <div class="col p-0 ${hiddenClass}" ${hiddenStyle}>
                    <a href="${image.src}" class="gallery-popup" title="${image.title}">
                        <div class="box snake">
                            <div class="ar-box-16-9">
                                <img src="${image.src}" class="gallery-img" alt="${image.title}">
                                <div class="overlay">
                                    <div class="overlay-content">
                                        <h3>${image.title}</h3>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </a>
                </div>
            `;
            galleryWrapper.append(itemHtml);
        });
        
        if ($(".hidden-item").length === 0) {
            $("#loadMoreBtn").hide();
        }

        galleryWrapper.magnificPopup({
            delegate: 'a.gallery-popup',
            type: 'image',
            gallery: {
                enabled: true
            }
        });

        $("#loadMoreBtn").on('click', function(e){
            e.preventDefault();
            $(".hidden-item:hidden").slice(0, 3).slideDown();
            if($(".hidden-item:hidden").length == 0){
                $(this).fadeOut('slow');
            }
        });
    });
    </script>
</body>
</html>